package com.ljf.code.web;

import com.ljf.code.dto.other.TextConversionTranslation;
import com.ljf.code.service.ITextConversionService;
import com.ljf.common.exception.ServiceException;
import com.ljf.common.result.ResultModel;
import com.ljf.common.web.NoDBBasisController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * 文本转换  控制器
 *
 * @author LJF
 * @since 2024-05-10
 */
@RestController
@RequestMapping("/code/text_conversion")
@Api(value = "文本转换接口", tags = "文本转换接口")
public class TextConversionController extends NoDBBasisController<ITextConversionService> {

    @PostMapping("/translation")
    @ApiOperation(value = "转化接口")
    public ResultModel translation(@RequestBody TextConversionTranslation model) throws ServiceException {
        return service.translation(model);
    }

}